package com.example.jdk12;

import java.time.DayOfWeek;

public class SwitchExpretion {
    public static void main(String[] args) {
        int day = 3;
        String dayType = switch (day) {
            case 1, 2, 3, 4, 5 -> "Weekday";
            case 6, 7 -> "Weekend";
            default -> throw new IllegalArgumentException("Invalid dya: " + day);
        };
        System.out.println(dayType);


        var day2 = DayOfWeek.MONDAY;
        var response = switch (day2) {
            case MONDAY, FRIDAY, SUNDAY -> "Work hard ~~~";
            case TUESDAY, THURSDAY -> "Work smart ~~~";
            case WEDNESDAY -> "Hump day ~~~";
            default -> throw new IllegalStateException("Unknoew day");
        };
        System.out.println(response);

        System.out.println(System.getProperty("user.timezone"));
    }

}
